<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="ProjectStatuses.aspx.cs" Inherits="Admin_ProjectStatuses" Title="Untitled Page" %>

<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
  <table style="width: 100%; height: 100%">
      <tr>
          <td align="center" style="width: 100px">
              <h3>Edit Project Statuses</h3>
          </td>
      </tr>
        <tr>
            <td style="width: 100px" align="center">
                &nbsp;&nbsp;&nbsp;
                <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                    <asp:View ID="View1" runat="server">
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td style="width: 100px">
                                    <asp:Button ID="butNew" runat="server" OnClick="butNew_Click" Text="New" /></td>
                                <td style="width: 100px">
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="ObjectDataSource1" EmptyDataText="There are no data records to display."
                    ForeColor="#333333" GridLines="None" DataKeyNames="PST_ID" OnRowDataBound="GridView1_RowDataBound" AllowPaging="True" AllowSorting="True" Width="713px">
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:BoundField DataField="PST_ID" HeaderText="PST_ID" InsertVisible="False" SortExpression="PST_ID" Visible="False" />
                        <asp:BoundField DataField="PST_TITLE" HeaderText="TITLE" SortExpression="PST_TITLE" />
                        <asp:BoundField DataField="PST_DESCRIPTION" HeaderText="DESCRIPTION" SortExpression="PST_DESCRIPTION" />
                        <asp:CommandField ShowDeleteButton="True" />
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </asp:View>
                    <asp:View ID="View2" runat="server">
                <table border="0" style="width: 286px" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="right" style="width: 100px">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Title is required" ControlToValidate="tbo_Title">*</asp:RequiredFieldValidator>
                            &nbsp;<asp:Label ID="Label2" runat="server" Text="Title"></asp:Label></td>
                        <td style="width: 182px" align="left">
                            <asp:TextBox ID="tbo_Title" runat="server" Width="189px"></asp:TextBox>
                            </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 100px">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Descriptionis required" ControlToValidate="tbo_Desc">*</asp:RequiredFieldValidator>
                            <asp:Label ID="Label1" runat="server" Text="Description"></asp:Label></td>
                        <td style="width: 182px" align="left">
                            <asp:TextBox ID="tbo_Desc" runat="server" Width="189px"></asp:TextBox>
                            </td>
                    </tr>
                    <tr>
                        <td style="width: 100px; height: 24px;">
                        </td>
                        <td style="width: 182px; height: 24px;" align="left">
                            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                <tr>
                                    <td style="width: 100px">
    <asp:Button ID="but_Save" runat="server" Text="Save" OnClick="but_Save_Click" /></td>
                                    <td align="right" style="width: 100px">
                                        <asp:Button ID="butCancel" runat="server" Text="Cancel" /></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
                    </asp:View>
                </asp:MultiView>
                &nbsp;
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteProjectStatus"
                    InsertMethod="InsertProjectStatus" SelectMethod="GetProjectStatuses" TypeName="ProjectManager"
                    UpdateMethod="UpdateProjectStatus">
                    <DeleteParameters>
                        <asp:Parameter Name="PST_ID" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="PST_ID" Type="Int32" />
                        <asp:Parameter Name="PST_TITLE" Type="String" />
                        <asp:Parameter Name="PST_DESCRIPTION" Type="String" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:ControlParameter ControlID="tbo_Title" Name="Title" PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="tbo_Desc" Name="Desc" PropertyName="Text" Type="String" />
                    </InsertParameters>
                </asp:ObjectDataSource>
                &nbsp;
                &nbsp;&nbsp;
            </td>
        </tr>
    </table>
    &nbsp; &nbsp;
    &nbsp;&nbsp;
    </asp:Content>

